<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <title>{block name='title'}{$websiteSets['name']}{/block}</title>
    <meta name="keywords" content="{block name='keywords'}{$websiteSets['keywords']}{/block}">
    <meta name="description" content="{block name='description'}{$websiteSets['description']}{/block}">
    <link rel="shortcut icon" href="{if !empty($websiteSets['logo'])}{:tomedia($websiteSets['logo'])}{else}favicon.ico{/if}">

    {block name='baseCss'}
    <link rel="stylesheet" href="__ADMIN_COMPONENT__/bootstrap/bootstrap.min.css">

    <link href="__ADMIN_COMPONENT__/animate/animate.css" rel="stylesheet">

    <!--商城icon 后期将作废-->
    <link rel="stylesheet" type="text/css" href="__ADMIN_FONTS__/shop/iconfont.css?v=20170503">

    <!--原始样式-->
    <link rel="stylesheet" href="__ADMIN_CSS__/upload.css">
    <link rel="stylesheet" href="__ADMIN_CSS__/common.css">

    <!--后台装修-->
    <link href="__ADMIN_CSS__/admin.css?v=4.1.0" rel="stylesheet">
    {/block}

    {block name='baseFont'}
    <link href="__ADMIN_FONTS__/awesome/font-awesome.min.css?v=3.2.1" rel="stylesheet">
    {/block}

    <script type="text/javascript">
        if (navigator.appName === 'Microsoft Internet Explorer') {
            if (navigator.userAgent.indexOf("MSIE 5.0") > 0 || navigator.userAgent.indexOf("MSIE 6.0") > 0 || navigator.userAgent.indexOf("MSIE 7.0") > 0) {
                alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
            }
        }

        window.sysinfo = {
            'uniacid': '{$uniacid}',
            'uid': '{$uid}',
            'siteroot': '{$siteRoot}',
            'siteurl': '{$iaRoot}',
            'attachurl': '{$attachUrl}',
            'module': '{$module}',
        };
    </script>


    {block name='baseScript'}
    <script>var require = {urlArgs: 'v=20211031'};</script>
    <script src="__ADMIN_FONTS__/shop/iconfont.js"></script>
    <script type="text/javascript" src="__ADMIN_COMPONENT__/jquery/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="__ADMIN_JS__/web/util.js"></script>
    <script type="text/javascript" src="__ADMIN_COMPONENT__/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="__ADMIN_JS__/web/common.min.js"></script>
    <script type="text/javascript" src="__ADMIN_JS__/require.js"></script>
    <script src="__ADMIN_JS__/config.js"></script>

    <script>
        require(['jquery', 'jquery.gcjs', 'init', 'tip'],function($){
            $(() => {
                $('.magnifier img').each(function () {
                    let img = $(this);
                    let src = img.attr('src');
                    let isNo = img.hasClass('magnifier-no');
                    if (!isNo) {
                        img.wrap(`<a data-magnify="gallery" style="cursor:pointer;" onclick="showMagnifier('${src}',10)"></a>`);
                    }
                });
                $(".overlay").click(() => {
                    $("#bg-bk").fadeOut()
                    let body = document.querySelector('body');
                    body.classList.remove('no-scroll');
                })

            })
        });
    </script>

    <script type="text/javascript">
        // 图片放大
        $(window).keydown(function (e) {
            27 === e.which && ($("#bg-bk").fadeOut(), document.querySelector('body').classList.remove('no-scroll'))
        })

        function showMagnifier(url, multiple = 2.0) {
            let isDown = false;
            let closebk = $(".close-bk")
            let rotateBtn = $(".rotate-btn")
            let bg = $("#bg-bk")
            let step = 1;
            let x, y;
            let l;
            let t;
            let body = document.querySelector('body');
            let rotate = 0;

            $("#enlarge-image").empty()
            $("#enlarge-image").append("<img class='img' src='" + url + "'>")
            let img = document.querySelectorAll(".img")[0];

            body.classList.add('no-scroll');

            bg.fadeIn()

            /* zoom */
            document.onmousewheel = function (e) {
                let isbig = e.wheelDelta;
                if (isbig >= 0) {
                    if (step >= multiple) {
                    } else {
                        step += 0.1;
                        img.style.transform = "scale(" + step + ") " + (rotate > 0 ? `rotate(${rotate}deg)` : '');
                    }
                } else {
                    if (step <= 0.7) {
                    } else {
                        step -= 0.1;
                        img.style.transform = "scale(" + step + ") " + (rotate > 0 ? `rotate(${rotate}deg)` : '');
                    }
                }
            }
            /* zoom */

            img.onmousedown = function (e) {
                e.preventDefault()
                img.style.cursor = "move"
                // console.log(e.offsetX);
                // console.log(img.offsetLeft);
                x = e.clientX;
                y = e.clientY;
                l = img.offsetLeft;
                t = img.offsetTop;
                isDown = true;
            }

            document.onmousemove = function (e) {
                if (isDown == false) {
                    return;
                } else {
                    let nx = e.clientX;
                    let ny = e.clientY;
                    //计算移动后的左偏移量和顶部的偏移量
                    let nl = nx - (x - l);
                    let nt = ny - (y - t);
                    img.style.left = nl + 'px';
                    img.style.top = nt + 'px';
                }
            }

            img.onmouseup = function () {
                // img.style.cursor = "default"
                isDown = false
            }

            closebk.click(function () {
                bg.fadeOut()
            })
            rotateBtn.click(function () {
                if (rotate >= 360) {
                    rotate = 0;
                }
                rotate = rotate + 45;
                img.style.transform = "scale(" + step + ") " + (rotate > 0 ? `rotate(${rotate}deg)` : '');
            })
        }
    </script>

    <div class="modal fade" id="public_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>

    <script>
        // 计算页面高度
        let iframePage = document.getElementById('iframePage');
        if (iframePage) {
            let windowHeight = document.body.clientHeight;
            iframePage.style.height = (windowHeight - 145) + 'px';
        }
    </script>

    <script>
        // 二维码
        $(() => {
            // 鼠标移入弹出信息框
            $('[data-toggle="popover"]').popover("destroy").popover({
                container: $(document.body)
            });

            // tab切换
            $('#myTab a').click(function (e) {
                $('#tab').val($(this).attr('href'));
                e.preventDefault();
                $(this).tab('show');
            });

            // 鼠标选中弹出信息框
            $("[rel=pop]").popover({
                trigger: 'manual',
                placement: 'right',
                title: $(this).data('title'),
                html: 'true',
                content: $(this).data('content'),
                animation: false
            }).on("mouseenter", function () {
                var _this = this;
                $(this).popover("show");
                $(this).siblings(".popover").on("mouseleave", function () {
                    $(_this).popover('hide');
                });
            }).on("mouseleave", function () {
                var _this = this;
                setTimeout(function () {
                    if (!$(".popover:hover").length) {
                        $(_this).popover("hide")
                    }
                }, 100);
            });

            /*添加拖拽功能 start*/
            $(document).on("show.bs.modal", ".modal", function () {
                require(['jquery.ui'],() => {
                    $(this).draggable({
                        handle: ".modal-header",   // 只能点击头部拖动
                        cursor: 'move',
                    });
                    $(this).css("overflow", "hidden"); // 防止出现滚动条，出现的话，你会把滚动条一起拖着走的
                })
            });
            /*添加拖拽功能 end*/

            require(['jquery.qrcode'], function () {
                $(".qrcode-box").hover(function () {
                    $(this).children('.qrcode').show().html("").qrcode({
                        render: "canvas",
                        width: 140,
                        height: 140,
                        text: $(this).children('.qrcode').data('url')
                    });
                    $(this).children('.qrcode').append(`<div class="arrow" style="top: 50%;"></div>`)
                }, function () {
                    $(this).children('.qrcode').hide();
                })

                $(".qrcode-info").each(function () {
                    $(this).children('.qrcode').show().html("").qrcode({
                        render: "canvas",
                        width: 140,
                        height: 140,
                        text: $(this).children('.qrcode').data('url')
                    });
                })
            });
        })
    </script>

    <script>
        if ($('form.form-validate').length <= 0) {
            window.formInited = true;
        }

        window.formInitTimer = setInterval(function () {
            if (typeof (window.formInited) !== 'undefined') {
                $('#page-loading').remove();
                clearInterval(window.formInitTimer);
            }
        }, 1);
    </script>

    <!--低分辨率一级导航显示不全问题 start-->
    <script>
        let navheight = document.getElementById('navheight');
        let navwidth = document.getElementById('navwidth');
        let vh = document.body.clientHeight;
        let vw = screen.width;

        if (navheight) {
            if (vh < 800) {
                navheight.classList.add("wb-navheight");
            } else {
                navheight.classList.remove("wb-navheight");
            }

            if (vw < 1300) {
                navwidth.classList.add("wb-navwidth");
            }
        }
    </script>

    <!--低分辨率一级导航显示不全问题 end-->

    <script>
        // 模态框
        function ajaxModel(obj) {
            let url = $(obj).data('url');
            // console.log(url);
            $.get(url, {}, function (html) {
                $("#public_modal").html(html).modal('show');
            });
        }
    </script>
    {/block}
</head>
<style>
    .wb-container {
        margin: 0 0 0 130px;
    }

    .wb-nav ~ .wb-subnav ~ .wb-container {
        margin-right: 0;
    }

    .wb-header .dropdown-menu > li {
        width: 100%;
    }

    .wb-header ul li.dropdown.ellipsis {
        min-width: 230px;
    }
</style>
<style>
    .table > thead > tr > td.full, .table > tbody > tr > td.full, .table > tfoot > tr > td.full {
        overflow: hidden;
    }

    tbody tr td {
        position: relative;
    }

    tbody tr .icow-weibiaoti-- {
        visibility: hidden;
        display: inline-block;
        color: #fff;
        height: 18px;
        width: 18px;
        background: #e0e0e0;
        text-align: center;
        line-height: 18px;
        vertical-align: middle;
    }

    tbody tr:hover .icow-weibiaoti-- {
        visibility: visible;
    }

    tbody tr .icow-weibiaoti--.hidden {
        visibility: hidden !important;
    }
</style>
<style>
    #bg-bk {
        position: absolute;
        right: 30px;
        bottom: 30px;
        display: none;
        overflow: hidden;
        width: 700px;
        height: 400px;
        background-color: rgba(0, 0, 0, .6);
        z-index: 1000;
    }

    #bg-content-bg {
        position: relative;
        display: flex;
        margin: 0 auto;
        height: 100%;
        max-width: 960px;
        min-width: 300px;
        text-align: center;
        flex-direction: column;
        justify-content: center
    }

    .overlay {
        width: 100%;
        height: 100%;
        position: fixed;
        z-index: -1;
        top: 0;
        left: 0;
    }

    .enlarge-image {
        display: flex;
        width: 100%;
        height: 100%;
        flex-direction: column;
        justify-content: center
    }

    .img {
        position: absolute;
        left: 10%;
        width: 80%;
        max-height: 90%;
        cursor: move;
        object-fit: contain;
    }

    .rotate-btn {
        position: absolute;
        top: 20px;
        right: 80px;
        z-index: 999999999999999999999999;
        width: 36px;
        height: 36px;
        color: #fff;
        font-size: 40px;
        cursor: pointer;
        border: 1px solid #fff;
        border-radius: 100%;
        text-align: center;
        line-height: 46px;
    }

    .close-bk {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 999999999999999999999999;
        width: 36px;
        height: 36px;
        color: #fff;
        font-size: 26px;
        cursor: pointer;
        border: 1px solid #fff;
        border-radius: 100%;
        text-align: center;
        line-height: 30px;
    }

    .close-bk:hover {
    }

    .no-scroll {
        overflow: hidden;
    }
</style>
{block name='style'}{/block}
<!-- 结 构 代 码 -->
<body>

{block name='header'}{/block}
{block name='menus'}{/block}

{block name='container'}
<div class="wb-container">

    <div style="padding: 0 20px 30px 20px;box-sizing: border-box;" class="wb-content">
        {block name='content'}{/block}
    </div>

    <div id="page-loading">
        <div class="page-loading-inner">
            <div class="sk-three-bounce">
                <div class="sk-child sk-bounce1"></div>
                <div class="sk-child sk-bounce2"></div>
                <div class="sk-child sk-bounce3"></div>
            </div>
        </div>
    </div>

    {block name='copyright'}{/block}
</div>

{/block}

<!--图片放大 start-->
<div id="bg-bk" style="display: none;">
    <div class="overlay"></div>
    <div class="rotate-btn">*</div>
    <div class="close-bk">×</div>
    <div id="bg-content-bg">
        <div class="enlarge-image" id="enlarge-image"></div>
    </div>
</div>
<!--图片放大 end-->

{block name='script'}{/block}

</body>

</html>